<div class="pdt10">
  <%= simple_form_for(@tag) do |f| %>
      <%= f.error_notification %>
      <%= f.input :name,
                  label: "标题",
                  required: false,
                  autofocus: true,
                  wrapper_html: {class: "form-group"},
                  input_html: { class: "form-control",
                                id: "topic_title"}%>

      <%= f.input :intro,
                  label: "简介",
                  as: :text,
                  required: false,
                  wrapper_html: {class: "form-group"},
                  input_html: {class: "form-control",
                               id: "topic_intro",
                               placeholder: "简介",
                               rows: "8"} %>

      <%= label_tag(:root_tag, "主标签") %>
      <%= check_box_tag :root_tag %>

      <%= f.select :parent_id, nested_set_options(Tag, @Tag) {|i| "#{'-' * i.level} #{i.name}" },
                   label: "父标签",
                   required: false %>


      <button type="submit" class="btn btn-default">提 交</button>
  <% end %>
</div>